﻿//-----------------------------------------------------------------------
// <copyright file="ClassDef.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the ClassDef class.</summary>
//-----------------------------------------------------------------------

namespace Tulip.Rules.CodeGen.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using Engine.Models.ClosedWorld;

    /// <summary>
    /// Class definition.
    /// </summary>
    [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate",
        Justification = "Reviewed. Suppression is OK here.")]
    public class ClassDef
    {
        /// <summary>
        /// The name of the class.
        /// </summary>
        public string ClassName;

        /// <summary>
        /// The extension of the class.
        /// </summary>
        public string Extends;

        /// <summary>
        /// The role of the class (Entity, JoinRoot, Join or Production).
        /// </summary>
        public TupleRole Role;

        /// <summary>
        /// Collection of facts definitions.
        /// </summary>
        public IEnumerable<FactDef> Facts;

        /// <summary>
        /// Collection of member definitions.
        /// </summary>
        public IEnumerable<MemberDef> Members;

        /// <summary>
        /// Collection of relation definitions.
        /// </summary>
        public IEnumerable<RelationDef> Relations;

        /// <summary>
        /// The salience (priority) of the production.
        /// </summary>
        public int ProductionSalience;

        /// <summary>
        /// The position of the production.
        /// </summary>
        public int ProductionPosition;

        /// <summary>
        /// The specificity of the production (a complexity measure).
        /// </summary>
        public int ProductionSpecificity;

        /// <summary>
        /// Textual representation of production actions.
        /// </summary>
        public string ProductionUiActionText;

        /// <summary>
        /// A collection of expression definitions.
        /// </summary>
        public IEnumerable<ExpressionDef> ProductionExpressions;
    }
}
